package FIleInpuSteam;

import java.io.FileOutputStream;

public class OutputStream {
    public static void main(String[] args) throws Exception {
        FileOutputStream os = new FileOutputStream("D:\\wc.txt",true);//true是追加，去掉true就是覆盖
        byte[] bytes = "我爱中国我".getBytes();
        os.write(bytes);
        os.write(bytes,0,15);//标明截取长度
        os.write("\r\n".getBytes());//换行符
        os.close();
    }
}
